Accusoft.BarcodeXpress9.Net
Write a DataMatrix Barcode
Send Feedback
Barcode Xpress 9 for .Net - User Guide > How To > Create a Barcode > Create a 2D Barcode > Write a DataMatrix Barcode

Glossary Item Box

Use the code example below as a guideline for writing DataMatrix barcodes.

C# - Basic steps for barcode writing DataMatrix Barcodes using Accusoft.BarcodeXpress.Net Copy Code
//create and unlock the BarcodeXpress component
BarcodeXpress bcx = new BarcodeXpress();
// The SetSolutionName and SetSolutionKey methods must be called to distribute the runtime.
bcx.Licensing.SetSolutionName("YourSolutionName");
bcx.Licensing.SetSolutionKey(12345,12345,12345,12345);
// The SetOEMLicenseKey method is required if Manually Reported Runtime Licensing is used.
bcx.Licensing.SetOEMLicenseKey("1.0.AStringForOEMLicensing");
//Create the writer DataMatrix class
WriterDataMatrix dataMatrix = new WriterDataMatrix(bcx);
// Set the text value
dataMatrix.BarcodeValue = "DataMatrix Value";
//call Create and get resulting image
if (imageXView1.Image != null)
   imageXView.Image.Dispose();
imageXView1.Image = Accusoft.ImagXpressSdk.ImageX.FromHdib(imagXpress1, dataMatrix.Create(), true);
// dispose of the writer DataMatrix and barcode component
dataMatrix.Dispose();
bcx.Dispose(); 
©2013. Accusoft Corporation. All Rights Reserved.